<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/
// ==================================================================
//路由组指定中间件
//Route::get('/', ['middleware' => ['first', 'second'], function () {
//}]);
//为路由指定中间件(没有登录不能访问)
//Route::get('/', function () {
    //
//}])->middleware(['first', 'second']);

Route::get('/demo',function(){
	return view('home/layout/demo');
});


Route::get('/a',function(){
	return view('a');
});

//隐式控制器中间件(在该隐式控制器的方法里加上如下代码,就可以限定该隐式控制器的所有方法)
// protected $middleware = ['App\Http\Middleware\LoginMiddleware'=>[]];
// =======================================================================
// Route::get('/suggest',function(){
// 	return view('home/suggest');
// });

//前台
//数据分享
Route::get('/share','ShareController@share');
//首页
Route::get('/','home\IndexController@index');

// //网站建议反馈
Route::controller('/suggest','home\SuggestController');

//资讯隐式控制器
Route::controller('/home/zixun','home\ZixunController');

//登录注册退出路由
Route::controller('/login','home\LoginController');


//视频分类展示路由
Route::controller('/home','home\ListController');

//广告路由
Route::controller('/ads','home\AdsController');

//个人中心(方法内配置中间件,方法见控制器)
Route::controller('/geren','home\UserController');

//前台会员注册路由
Route::controller('/member','home\MemberController');
//播放页路由
Route::controller('/play','home\PlayController');

//视频榜单路由
Route::controller('/order','home\OrderController');


// =================================================================================

//后台
//后台首页
Route::get('/admin',function(){
	return view('admin.index');
});

//后台用户管理
Route::controller('/admin/user','admin\UserController');

//后台分类管理
Route::controller('/admin/type','admin\TypeController');

//后台广告管理
Route::controller('/admin/ad','admin\AdController');

//后台资讯管理
Route::controller('/admin/news','admin\NewsController');

//后台配置管理
Route::controller('/admin/config','admin\ConfigController');

//后台友情管理
Route::controller('/admin/firend','admin\FirendController');

//后台意见查看
Route::controller('/admin/proposal','admin\ProposalController');

//后台登录
Route::controller('/admin/logins','admin\LoginsController');
